<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // 1.一旦给const修饰的标识符被赋值之后,不能修改
    // const name = 'why'
    // name = 'abc'

    // 2.在使用const定义标识符,必须进行赋值
    // const name;

    // 3.常量的含义是指向的对象不能修改,但是可以改变内部的属性
    const obj = {
      name: 'why',
      age: 18
    }

    const arr = [1, 2, 3, 4]

    obj.name = 'cobe';
    obj.age = 40;
    obj.height = 1.88
    arr.push(5)
    console.log(obj);
    console.log(arr);
  </script>
</body>

</html>